package com.epin.business.system.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.DataAccessException;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.epin.base.defaults.AppConstants;
import com.epin.base.exception.check.RecordRepeatException;
import com.epin.business.system.dao.RoleMapper;
import com.epin.business.system.entity.Role;
import com.epin.business.system.entity.User;
import com.epin.business.system.service.ResourceRoleService;
import com.epin.business.system.service.RoleService;

/**
 * <p>
 * 角色表  服务实现类
 * </p>
 *
 * @author xj
 * @since 2016-12-20
 */
@Service
public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements RoleService {
	
	@Autowired
	private ResourceRoleService resourcesRoleService;
	
	private static final int ROLE_STATUS = 0;
	
	private static final int ADMIN_ROLE_ID = AppConstants.getAdminroleId();
	
	private static final int TEMP_DEL_LENGTH = 9;
	
	private static final int NAME_DEL_LENGTH = 2;

	@Override
	public Page<Role> selectRolesPage(Integer pageNumber, Integer pageSize, Integer companyId, String keyword) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<Role> selectRolesByCompanyId(Integer companyId) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<Role> selectAllRolesByCompanyId(Integer companyId) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<Role> selectAllRolesByCompanyUId(String companyUId) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<Role> selectDefaultRoles() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public boolean insertOrUpdateRole(Integer id, Role rInfo, User operator) throws RecordRepeatException {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public boolean insertDefaultRolesByCompanyId(Integer companyId) {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public boolean deleteRoleResource(Integer roleId) {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public boolean deleteRolesByIds(List<Integer> ids) throws DataAccessException {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public boolean savePermission(Integer roleId, List<Integer> resourceIds) {
		// TODO Auto-generated method stub
		return false;
	}
	
	
	
	
}
